#ifndef SCS_MOTOR_H
#define SCS_MOTOR_H
#include "instruction.h"
#include "sys.h"

void Host2SCS(u8 *DataL, u8* DataH, int Data);
int SCS2Host(u8 DataL, u8 DataH);
void writeBuf(u8 ID, u8 MemAddr, u8 *nDat, u8 nLen, u8 Fun);
int genWrite(u8 ID, u8 MemAddr, u8 *nDat, u8 nLen);
int writeByte(u8 ID, u8 MemAddr, u8 bDat);
int writeWord(u8 ID, u8 MemAddr, u8 wDat);
int Read(u8 ID, u8 MemAddr, u8 *nData, u8 nLen);
int readByte(u8 ID, u8 MemAddr);
int readWord(u8 ID, u8 MemAddr);
int Ack(u8 ID);
int general_WritePos(u8 ID, u16 Position, u16 Time, u16 Speed);
int writePos(u8 ID, u16 Position, u16 Time, u16 Speed, u8 Fun);
int ReadPos(u8 ID);
int Ping(uint8_t ID);



#endif

